package DoubanMovie;
/*
import java.math.BigDecimal;
import java.math.RoundingMode;

class DoubanMovie extends AbstractMovie {
    private double rating;
    private int ratingCount;

    public DoubanMovie(String name, String director, String actors, double initialRating) {
        super(name, director, actors, "");
        this.rating = initialRating;
        this.ratingCount = 1;
    }
    @Override
    public double rate(double newRating) {
        ratingCount++;
        rating = (rating * (ratingCount - 1) + newRating) / ratingCount;
        return BigDecimal.valueOf(rating).setScale(6, RoundingMode.HALF_UP).doubleValue();
    }

    public double getRating() {
        return rating;
    }

    public int getRatingCount() {
        return ratingCount;
    }
}*/